Skip to content

Improve ipa-tuura Containerfile to fetch code from Git#147

Open
f-trivino wants to merge 1 commit into
freeipa:mainfrom
f-trivino:ipalab-changes
Open

Improve ipa-tuura Containerfile to fetch code from Git#147
f-trivino wants to merge 1 commit into
freeipa:mainfrom
f-trivino:ipalab-changes

Conversation

@f-trivino

Copy link
Copy Markdown
Collaborator

This commit updates the Containerfile used to build the ipa-tuura service so that it fetches the code from a Git repository instead of relying on a local folder. This change makes the image easier to build from external projects such as ipalab-config or freeipa-local-tests, enabling better integration and automation.

This commit updates the Containerfile used to build the ipa-tuura service
so that it fetches the code from a Git repository instead of relying on
a local folder. This change makes the image easier to build from external
projects such as ipalab-config or freeipa-local-tests, enabling better
integration and automation.
@antoniotorresm

Copy link
Copy Markdown
Collaborator

I'm not sure about this change, pulling from git will make it impossible to build the container with local changes, and it would also break GitHub actions.

@f-trivino

Copy link
Copy Markdown
Collaborator Author

/retest

Comment thread Containerfile

# Copy the source code
WORKDIR /www
RUN git clone https://github.com/freeipa/ipa-tuura ipa-tuura

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turn the URL into an ARG SOURCE_URL=https://github.com/freeipa/ipa-tuura and then do

ARG SOURCE_URL=../ipa-tuura
ARG SOURCE_CMD=cp -pr
RUN ${SOURCE_CMD} ${SOURCE_URL} ipa-tuura

for local runs where we copy things locally, just don't pass anything or pass the full path with podman-build --build-arg=SOURCE_URL=$(pwd), for cloning remotely use podman-build --build-arg=SOURCE_URL=https://github.com/freeipa/ipa-tuura --build-arg=SOURCE_CMD="git clone".

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or these arguments can be put into a file and then build args file can be specified with podman-build --build-arg-file clone-from-github.args:

$ cat clone-from-github.args
SOURCE_URL=https://github.com/freeipa/ipa-tuura
SOURCE_CMD=git clone
$ podman-build --build-arg-file=./clone-from-github.args ...

We can also turn the defaults around and have local copying be a custom version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants